package guestbook;

import com.google.api.client.googleapis.GoogleUrl;
import com.google.api.client.util.Key;

/**
 * @author Alejandro Gomez (alejandro.gomez@fdvsolutions.com)
 *         Date: 8/18/11
 *         Time: 6:31 PM
 */
public class CalendarUrl extends GoogleUrl {

    static final String ROOT_URL = "https://www.google.com/calendar/feeds";

    @Key
    String gsessionid;

    CalendarUrl(String url) {
        super(url);
        // set to true only if you want pretty-printed JSON result for debugging
        prettyprint = true;
    }

    static CalendarUrl forOwnCalendarsFeed() {
        CalendarUrl result = new CalendarUrl(ROOT_URL);
        result.pathParts.add("default");
        result.pathParts.add("owncalendars");
        result.pathParts.add("full");
        return result;
    }
}
